package com.itheima.service;

import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.pojo.Role;
import com.itheima.pojo.SysUser;

import java.util.List;

/**
 * @author 黑马程序员
 * @Company http://www.ithiema.com
 * @Version 1.0
 */
public interface UserService {

	SysUser findByUsername(String username);

	/*根据条件查询分页*/
	PageResult findPage(QueryPageBean queryPageBean);

	/*添加会员*/
	void add(Integer[] roleIds, SysUser sysUser);

	/*删除用户*/
	void deleteById(Integer id);

	/*编辑中数据回显，根据id查询用户*/
	SysUser findById(Integer id);

	/*根据userId查询roleIds(即user和role的关联)*/
	Integer[] findRoleIdsByUserId(Integer id);

	/*编辑用户*/
	void edit(Integer[] roleIds, SysUser sysUser);
}
